var countdown = 60;

var lastDir, i = 0;
var total = 200;
var time = 0;
var isEnd = false;

function settime(obj) {
	if(countdown == 0) {
		obj.removeAttribute("disabled");
		obj.value = "开始";
		countdown = 60;
		return;
	} else {
		obj.setAttribute("disabled", true);
		obj.value = countdown + "s";
		countdown--;

	}
	setTimeout(function() {
		settime(obj)

	}, 1000)

	//手指滑动

	setInterval(function() {
		time += 100;
		if(time > 6000000) {
			isEnd = true;

		}
		$(".dengguang,.dengguang2").css("opacity", 0);
	}, 200)
	touch.on(".Fricrion-web", "drag", function(e) {
		if(!isEnd) {
			var curDir = e.direction;
			if(curDir != lastDir) {
				i++;
				var per2 = ((i / total) * 30).toFixed(0);
				$(".jindu").css("width", per2 + "%");
				$(".xiaokuang").css("margin-left", per2 + "%");
				$(".xiaokuang p span").text(per2);
				localStorage.powerPer = per2;
				$(".dengguang,.dengguang2").css("opacity", 3);
			}
			lastDir = curDir;
		}

	})
	$(".huadong").css("display", "none");
	setTimeout(function() {
		location.href = "Invite.html";
		if(par){}

	}, 60000)
}